@model MeasureSearchModel

@{
    //page title
    ViewBag.PageTitle = T("Admin.Configuration.Shipping.Measures").Text;
    //active menu item (system name)
    Html.SetActiveMenuItemSystemName("Measures");
    
    const string hideDimensionsBlockAttributeName = "MeasuresPage.HideDimensionsBlock";
    var hideDimensionsBlock = genericAttributeService.GetAttribute<bool>(workContext.CurrentCustomer, hideDimensionsBlockAttributeName);

    const string hideWeightsBlockAttributeName = "MeasuresPage.HideWeightBlock";
    var hideWeightsBlock = genericAttributeService.GetAttribute<bool>(workContext.CurrentCustomer, hideWeightsBlockAttributeName);
}

<div class="content-header clearfix">
    <h1 class="pull-left">
        @T("Admin.Configuration.Shipping.Measures")
    </h1>
    <div class="pull-right">
        &nbsp;
        @await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.MeasureListButtons })
    </div>
</div>

<div class="content">
    <div class="form-horizontal">

        <nop-panels id="category-panels">
            <nop-panel asp-name="measures-dimensions" asp-icon="fa fa-cog" asp-title="@T("Admin.Configuration.Shipping.Measures.Dimensions")" asp-hide-block-attribute-name="@hideDimensionsBlockAttributeName" asp-hide="@hideDimensionsBlock" asp-advanced="false">@await Html.PartialAsync("Dimensions", Model)</nop-panel>
            <nop-panel asp-name="measures-weights" asp-icon="fa fa-truck" asp-title="@T("Admin.Configuration.Shipping.Measures.Weights")" asp-hide-block-attribute-name="@hideWeightsBlockAttributeName" asp-hide="@hideWeightsBlock" asp-advanced="false">@await Html.PartialAsync("Weights", Model)</nop-panel>

            @await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.MeasureListBlock })
        </nop-panels>
    </div>
</div>
<nop-action-confirmation asp-button-id="btnMarkAsPrimaryDimension" asp-additional-confirm="Admin.Configuration.Shipping.Measures.AdditionalConfirm" />
<nop-action-confirmation asp-button-id="btnMarkAsPrimaryWeight" asp-additional-confirm="Admin.Configuration.Shipping.Measures.AdditionalConfirm" />

